home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / pascal / tch_tpas.zip / PROG7.PAS < prev    next >
Pascal/Delphi Source File  |  1986-04-05  |  1KB  |  42 lines

  1. PROGRAM PROG7;
  2. {$U+          Copyright (C), 1985 by Lyle Faurot.  All rights reserved.
  3.  
  4.     New Topics: REPEAT statement
  5.                 CHAR data type
  6.  
  7. }
  8.  
  9. VAR
  10.   Response         : Char;
  11.   Correct_Response : Boolean;
  12.  
  13. BEGIN
  14.   WriteLn('Turbo Pascal seems to ');
  15.   WriteLn;
  16.   WriteLn('A. Run faster than other Pascals.');
  17.   WriteLn('B. Compile faster than others.');
  18.   WriteLn('C. Take less room in memory.');
  19.   WriteLn('D. All of the above.');
  20.   WriteLn;
  21.  
  22.   REPEAT
  23.       Write('Enter your choice - A, B, C, or D: ');
  24.       ReadLn(Response);
  25.       WriteLn;
  26.  
  27.       If (Response = 'D') or (Response = 'd')
  28.           THEN
  29.             Correct_Response := True
  30.           ELSE
  31.             Correct_Response := False;
  32.  
  33.       If Correct_Response
  34.           THEN
  35.             WriteLn('Right!')
  36.           ELSE
  37.             WriteLn('Wrong choice, try again.');
  38.  
  39.   UNTIL Correct_Response;
  40.  
  41. END.
  42.